﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_GetMyClassApproved]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_GetMyClassApproved];
GO
CREATE PROCEDURE [dbo].[sproc_GetMyClassApproved] 
    @ClassID int
/*

============================================================
功能:    得到该组的未审批文档
参数:
    @ClassID int        :    组（类）的ID
============================================================

*/

AS

SELECT * 
    FROM 
        uds_document 
    WHERE     ClassID = @classid 
        and docdeletion =0 
        and doctype =0 
        and docapproved=0 
    ORDER BY DocAddedDate DESC